package com.demo.biz.user.model.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;

/**
 * 用户登录请求实体
 *
 * @author 曳戈泰尔
 * @since 2023-03-14
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "UserLoginReq", description = "用户登录请求实体")
public class UserLoginReq {

    @ApiModelProperty(value = "用户授权code", required = true)
    @NotBlank
    @Size(min = 1, max = 130)
    private String code;

    @ApiModelProperty(value = "登录类型，0-微信小程序，1-抖音小程序", required = true)
    @NotNull
    @Max(value = 5)
    @Min(value = 0)
    private Integer type;
}
